#pragma once
#ifndef __MATERIAL__WINDOW__HH__
#define __MATERIAL__WINDOW__HH__

#include <QtGui/QDialog>
#include <LitStream.h>
#include "MaterialTextEdit.h"
#include "MaterialEditorWidget.h"

namespace Lit
{
	namespace Editor
	{
		namespace Material
		{
			class Window : public QMdiSubWindow
			{
				Q_OBJECT
				QMdiArea * mArea;
				EditorWidget * mEditor;
				std::string mName;
				std::string mProjectName;
			public:
				Window( const std::string &name, const std::string &project_name, QMdiArea * area );
				~Window();
			
				const std::string &getProjectName() const{ return mProjectName; }
				const std::string &getName() const{ return mName; }

				void closeEvent( QCloseEvent * evt );
			
				TextEdit * getCodeEditor();
				const TextEdit * getCodeEditor() const;

				EditorWidget * getEditor();
				const EditorWidget * getEditor() const;

			protected slots:
				void modifiedStateChanged( bool state );
			};
		};
	};
};

#endif